/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lardocelar.core.basededados;

import br.com.lardocelar.core.BaseDeDados;
import br.com.lardocelar.core.IpUtil;
import br.com.lardocelar.core.Servidor;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author LeandroL
 */
public class Virtual implements BaseDeDados {

    private String user;
    private String pass;

    public Virtual() {

    }

    @Override
    public String getId() {
        return "0";
    }

    @Override
    public String getDriver() {
        return "Em memória";
    }

    @Override
    public String getUrl() {
        return "Em memória";
    }

    @Override
    public String getUser() {
        return user;
    }

    @Override
    public String getPass() {
        return pass;
    }

    @Override
    public void setUser(String User) {
        user = User;
    }

    @Override
    public void setPass(String Pass) {
        pass = Pass;
    }

    @Override
    public Connection getDBConnection() {
        return null;
    }

    @Override
    public List ListarTodosServidores() {
        List<Servidor> servidores = new ArrayList<>();
        for(int i = 0 ; i < 10; i++){ 
            servidores.add(Servidor.Carregar(IpUtil.parseStringToBytes("10.1.12."+i), (1000+i)));
        }
        return servidores;
    }
}
